package sk.fiit.icp.data;

// Generated Nov 27, 2011 12:56:29 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Users generated by hbm2java
 */
@Entity
@Table(name = "users", catalog = "icp")
public class Users implements java.io.Serializable {

	private Integer id;
	private String fname;
	private String lname;
	private String email;
	private String password;
	private Date birthdate;
	private String address;
	private String city;
	private String state;
	private String phone;
	private Set<Events> eventses = new HashSet<Events>(0);
	private Set<Settings> settingses = new HashSet<Settings>(0);

	public Users() {
	}

	public Users(String fname, String lname, String email, String password) {
		this.fname = fname;
		this.lname = lname;
		this.email = email;
		this.password = password;
	}

	public Users(String fname, String lname, String email, String password, Date birthdate, String address,
			String city, String state, String phone, Set<Events> eventses, Set<Settings> settingses) {
		this.fname = fname;
		this.lname = lname;
		this.email = email;
		this.password = password;
		this.birthdate = birthdate;
		this.address = address;
		this.city = city;
		this.state = state;
		this.phone = phone;
		this.eventses = eventses;
		this.settingses = settingses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "fname", nullable = false, length = 70)
	public String getFname() {
		return this.fname;
	}

	public void setFname(String fname) {
		this.fname = fname;
	}

	@Column(name = "lname", nullable = false, length = 100)
	public String getLname() {
		return this.lname;
	}

	public void setLname(String lname) {
		this.lname = lname;
	}

	@Column(name = "email", nullable = false)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "password", nullable = false)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "birthdate", length = 10)
	public Date getBirthdate() {
		return this.birthdate;
	}

	public void setBirthdate(Date birthdate) {
		this.birthdate = birthdate;
	}

	@Column(name = "address", length = 100)
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "city", length = 45)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "state", length = 45)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "phone", length = 45)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "users")
	public Set<Events> getEventses() {
		return this.eventses;
	}

	public void setEventses(Set<Events> eventses) {
		this.eventses = eventses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "users")
	public Set<Settings> getSettingses() {
		return this.settingses;
	}

	public void setSettingses(Set<Settings> settingses) {
		this.settingses = settingses;
	}

}
